package org.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.demo.entity.UserStatus;

import java.util.List;

@Mapper
public interface UserStatusMapper {


    /**
     * 根据用户id获取状态
     * @param userId
     * @return
     */
    @Select("select * from user_status where user_id = #{userId}")
    List<UserStatus> getByUserId(Integer userId);


    /**
     * 插入用户状态
     * @param userStatus
     */
    void insert(UserStatus userStatus);
}
